Copying, Sharing, and Aliasing
نویسندگان
چکیده
Study of the history of programming languages reveals a subtle interplay between semantics and implementation. Early languages, designed for maximum eeciency, provided simple abstractions of the underlying hardware. These languages were followed by languages that were \problem oriented" in that they attempted to hide the grosser details of the underlying hardware. Yet confusion between semantics and implementation persists, encouraged by the survival of low-level features that are deemed to be essential for eeciency. Copying, sharing, and aliasing are examples of concepts that render the task of the programmer more diicult by confusing semantics and implementation. For object oriented programs, the important distinction is not between values and references, but between mutable and immutable objects. This distinction is the basis for a model of computation that is untainted by implementation considerations and that provides the necessary foundation for object oriented modeling.
منابع مشابه
Implementing Explicit and Finding Implicit Sharing in Embedded DSLs
Aliasing, or sharing, is prominent in many domains, denoting that two differently-named objects are in fact identical: a change in one object (memory cell, circuit terminal, disk block) is instantly reflected in the other. Languages for modelling such domains should let the programmer explicitly define the sharing among objects or expressions. A DSL compiler may find other identical expressions...
متن کاملFlexible Aliasing with Protection
Unwanted effects of aliasing cause encapsulation problems in object oriented programming. Nevertheless, aliasing is part of common and efficient programming techniques for expressing sharing of objects and as such its general restriction is not an option in practice. We present an approach that allows full referential object sharing, but adds access control to object references to limit the eff...
متن کاملSpecifying Compatible Sharing in Data Structures
Automated verification of programs that utilize data structures with intrinsic sharing is a challenging problem. We develop an extension to separation logic that can reason about aliasing in heaps using a notion of compatible sharing. Compatible sharing can model a variety of fine grained sharing and aliasing scenarios with concise specifications. Given these specifications, our entailment proc...
متن کاملMinimal Ownership for Active Objects
Active objects offer a structured approach to concurrency, encapsulating both unshared state and a thread of control. For efficient data transfer, data should be passed by reference whenever possible, but this introduces aliasing and undermines the validity of the active objects. This paper proposes a minimal variant of ownership types that preserves the required race freedom invariant yet enab...
متن کاملUnification with Lazy Non-Redundant Copying
This paper presents a unification procedure which eliminates the redundant copying of structures by using a lazy incremental copying appr0a~:h to achieve structure sharing. Copying of structures accounts for a considerable amount of the total processing time. Several methods have been proposed to minimize the amount of necessary copying. Lazy Incremental Copying (LIC) is presented as a new solu...
متن کامل